﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.CompilerServices;

public interface IAwaiter : INotifyCompletion
{
    bool IsCompleted { get; set; }
}

public interface IAwaiter<T> : IAwaiter where T : IAwaiter
{
    T GetAwaiter();
    void GetResult();
}

public interface IAwaiter<T, TResult> : IAwaiter where T : IAwaiter
{
    T GetAwaiter();

    TResult GetResult();
}

public interface ICancelable
{
    void Cancel();
}


